//
//  CJSSearch.m
//  GoTraveling
//
//  Created by 陈金山 on 15/12/30.
//  Copyright © 2015年 开发华佗. All rights reserved.
//

#import "CJSSearch.h"

@implementation CJSSearch

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
    if ([key isEqualToString:@"date_added"]) {
        NSDateFormatter* formatter = [[NSDateFormatter alloc] init];
        [formatter setDateStyle:NSDateFormatterMediumStyle];
        [formatter setTimeStyle:NSDateFormatterShortStyle];
        [formatter setDateFormat:@"yyyy.MM.dd"];
        NSDate *confromTimesp = [NSDate dateWithTimeIntervalSince1970:[value integerValue]];
        self.date = [formatter stringFromDate:confromTimesp];
    }
    if ([key isEqualToString:@"id"]) {
        self.Id = value;
    }
}

@end
